package com.hspedu.homework.homework04;

/**
 * @Author Stringzhua
 * @Date 2024/3/3 16:41
 * description:父类员工属性
 */
public class Employee {
    private String name;
    private double daysal;
    private int workdays;
    //分析出还有一个属性等级
    private double grade;

    //打印工资方法
    //方法名printSal
    public void printSal() {
        System.out.println(name + "  工资=" + daysal * workdays * grade);
    }

    //构造器

    public Employee(String name, double daysal, int workdays, double grade) {
        this.name = name;
        this.daysal = daysal;
        this.workdays = workdays;
        this.grade = grade;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getDaysal() {
        return daysal;
    }

    public void setDaysal(double daysal) {
        this.daysal = daysal;
    }

    public int getWorkdays() {
        return workdays;
    }

    public void setWorkdays(int workdays) {
        this.workdays = workdays;
    }

    public double getGrade() {
        return grade;
    }

    public void setGrade(double grade) {
        this.grade = grade;
    }
}
